package com.weiqiao.mall.repository.impl;

import com.weiqiao.base.dao.impl.BaseMongoDaoImpl;
import com.weiqiao.mall.repository.IMemberConfigRepository;
import org.bson.Document;
import org.bson.conversions.Bson;
import org.springframework.stereotype.Repository;

@Repository("MemberConfigRepositoryImpl")
public class MemberConfigRepositoryImpl extends BaseMongoDaoImpl implements IMemberConfigRepository {

    private static final String CONNECTION_NAME = "member_config";

    @Override
    public String getMemberConfigInfo(Bson filter) {
        return super.findOne(CONNECTION_NAME, filter);
    }

    @Override
    public Boolean updateMemberConfig(Bson filter, Document doc) {
        return super.updateOne(CONNECTION_NAME, filter, doc, true);
    }
}
